home *** CD-ROM | disk | FTP | other *** search
/ Diccionario Visual Trilingue / VISUAL.iso / SHARED.DIR / 10136_Position de themes.ls < prev    next >
Encoding:
Text File  |  1997-07-04  |  1.1 KB  |  34 lines

  1. on mouseDown
  2.   global gCurrentPosC
  3.   set Delta to the mouseV - the locV of sprite 13
  4.   set TempV to the mouseV - Delta
  5.   set TempV2 to the mouseV
  6.   repeat while the mouseDown
  7.     if rollOver(12) and (TempV2 <> the mouseV) then
  8.       set TempV to the mouseV - Delta
  9.       set TempV2 to the mouseV
  10.       if TempV > (SpriteBottom(12) - (SpriteHeight(13) / 2)) then
  11.         set the locV of sprite 13 to SpriteBottom(12) - (SpriteHeight(13) / 2)
  12.       else
  13.         if TempV < (SpriteTop(12) + (SpriteHeight(13) / 2)) then
  14.           set the locV of sprite 13 to SpriteTop(12) + (SpriteHeight(13) / 2)
  15.         else
  16.           set the locV of sprite 13 to TempV
  17.         end if
  18.       end if
  19.       set Percent to (the locV of sprite 13 - SpriteTop(12) - (SpriteHeight(13) / 2)) / ((SpriteHeight(12) - SpriteHeight(13)) * 1.0)
  20.       if Percent >= 1 then
  21.         setAt(gCurrentPosC, 1, getAt(gNbItemC, 1) - 20)
  22.       else
  23.         if Percent = 0 then
  24.           setAt(gCurrentPosC, 1, 1)
  25.         else
  26.           setAt(gCurrentPosC, 1, integer(Percent * 21) + 1)
  27.         end if
  28.       end if
  29.       SetWinContenu2(1, 14)
  30.     end if
  31.   end repeat
  32.   ActiveFieldC(1)
  33. end
  34.